Propagate read-only metadata to the Thing Description.#262
Merged
Conversation
0d24d7e to
4ee49c2
Compare
julianstirling
approved these changes
Feb 25, 2026
Contributor
julianstirling
left a comment
There was a problem hiding this comment.
Happy with this, but I'll let you check my commit.
I've changed some lines in test_thing_client that I think were intended to be `assert` statements: it now makes more sense. The test still passes, but should now be more sensitive. I also spotted a couple of minor typos in a docstring and an error.
4aab6db to
b1a7db9
Compare
rwb27
commented
Feb 25, 2026
Write-only properties are, in theory, supported in the client but not the server. This commit adds a test with a mocked Thing Description featuring a write-only property, and verifies the client behaves correctly. I also swapped "Method not allowed" for a more descriptive error for read/write-only properties.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds
readOnlyandwriteOnlyinto thePropertyAffordancethat's returned as part of the Thing Description. It includes a test for that.It also fixes a bug in
ThingClientwhere read-only properties were non-data descriptors, which meant they could be written to (but would then be functioning as local variables and not talking to the server). We previously fixed #165 forDirectThingClient, this is effectively the same bug but onThingClient.Closes #259